package com.hevery.beans;

/**
 * @description: 定义了bean的元数据
 * @author: hongyu.zhang
 * @create: 2018-03-20
 **/
public class BeanDefinition {
    /**具体是哪个bean*/
    private Object bean;
    /**属于哪个类*/
    private Class beanClass;
    /**类的名称*/
    private String beanClassName;
    /**属性列表*/
    private PropertyValues propertyValues = new PropertyValues();

    public BeanDefinition() {
    }

    public Object getBean() {
        return bean;
    }

    public void setBean(Object bean) {
        this.bean = bean;
    }

    public Class getBeanClass() {
        return beanClass;
    }

    public void setBeanClass(Class beanClass) {
        this.beanClass = beanClass;
    }

    public String getBeanClassName() {
        return beanClassName;
    }

    public void setBeanClassName(String beanClassName) {
        this.beanClassName = beanClassName;
        try {
            this.beanClass = Class.forName(beanClassName);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        };
    }

    public PropertyValues getPropertyValues() {
        return propertyValues;
    }

    public void setPropertyValues(PropertyValues propertyValues) {
        this.propertyValues = propertyValues;
    }
}
